import { request } from '../request';

export async function addByWeChat(data: any) {
    return request.post<any>(`/nurse_user_orders/nurseUserOrders/addByWeChat`, data, {
        useErrMsg: true
    });
}

export async function list(param: string) {
    return request.get<any>(`/nurse_user_orders/nurseUserOrders/listByWeChat${param}`, {}, {
        useErrMsg: true
    });
}


export async function queryByWeChat(id: string) {
    return request.get<any>(`/nurse_user_orders/nurseUserOrders/queryByWeChat?id=${id}`, {}, {
        useErrMsg: true
    });
}

export async function closeByWeChat(id: string) {
    return request.get<any>(`/nurse_user_orders/nurseUserOrders/closeByWeChat?outTradeNo=${id}`, {}, {
        useErrMsg: true
    });
}




export async function payByWeChat(outTradeNo: String) {
    return request.post<any>(`/nurse_user_orders/nurseUserOrders/payByWeChat?outTradeNo=${outTradeNo}`, {}, {
        useErrMsg: true
    });
}


export async function addComment(data: any) {
    return request.post<any>(`/nurse_user_orders/nurseUserOrders/addComment`, data, {
        useErrMsg: true
    });
}


export async function commentList({ pageNo, pageSize, userId }: any) {
    return request.get<any>(`/nurse_user_orders/nurseUserOrders/commentList?pageNo=${pageNo}&pageSize=${pageSize}&userId=${userId}`, {}, {
        useErrMsg: true
    });
}


export async function refundList({ pageNo, pageSize, userId }: any) {
    return request.get<any>(`/nurse_user_orders_refund/nurseUserOrdersRefund/list?pageNo=${pageNo}&pageSize=${pageSize}&userId=${userId}`, {}, {
        useErrMsg: true
    });
}

export async function addRefund(data: any) {
    return request.post<any>(`/nurse_user_orders_refund/nurseUserOrdersRefund/add`, data, {
        useErrMsg: true
    });
}

export async function getFeeControl() {
    return request.get<any>(`/fee_control/feeControl/list`, {}, {
        useErrMsg: true
    });
}